package day0725API;

import java.io.*;

public class Test11 {

    public static void main(String[] args) {
         /*try(FileInputStream fis=new FileInputStream("src/day0725API/Test1.java");
            InputStreamReader  isr=new InputStreamReader(fis)){*/
        char[]  chs=new char[10];
        try(FileInputStream fis=new FileInputStream("src/day0725API/Test1_2.txt");
            BufferedInputStream bis=new BufferedInputStream(fis);
            InputStreamReader isr=new InputStreamReader(bis);

            FileOutputStream fos=new FileOutputStream("src/day0725API/Test1_3.txt");
            BufferedOutputStream bos=new BufferedOutputStream(fos);
            OutputStreamWriter  osr=new OutputStreamWriter(bos);){
            int len=-1;
            while(  (len=isr.read(chs))!=-1){
                osr.write(chs,0,len);
                //osr.write(chs);
            }

        }catch (IOException e){
            e.printStackTrace();
        }finally {
            System.out.println("完毕");
        }
    }

}

